/** 
 * @ClassName:     SmsSendBackUpDao.java 
 * @Description:   TODO(用一句话描述该文件做什么)  
 * @author         wangzhe  
 * @Date           2019年7月24日 下午4:50:39  
 */  


package com.huitone.smspfm.oldclient.dao;

import java.sql.Types;
import java.util.ArrayList;
import java.util.List;

import com.huitone.smspfm.oldclient.dao.entity.SmsSend;

public class SmsSendBackUpDao extends BaseDao<SmsSend>{

	public int[] insertBackUpSms(List<SmsSend> smsSends) {
			List<Object[]> list = new ArrayList<>();
			for(SmsSend sms:smsSends){
				list.add(new Object[]{sms.getSerialNo(),sms.getClientName(),sms.getSendPort(),sms.getMobileNo(),sms.getContent(),sms.getWapUrl(),sms.getMesgType(),sms.getSrr()});
			}
			return jdbcTemplate.batchUpdate("insert into " + tableName + " (SERIALNO, CLIENTNAME, SENDPORT, MOBILENO, CONTENT, WAPURL, MESGTYPE, SRR) values (?, ?, ?, ?, ?, ?, ?, ?)", list, 
					new int[]{Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.INTEGER,Types.INTEGER});
	}
	
}
